package practice;

public class practice01 {
    public static void main(String[] args) {
        Teacher t1=new CGBTeacher();
        Teacher t2=new ACTTeacher();
        t1.ready();
        t1.teach();
        t2.ready();
        t2.teach();
        CGBTeacher c1=new CGBTeacher();
        CGBTeacher c2=new CGBTeacher("张大彪",25,25000,"男");
        ACTTeacher a1=new ACTTeacher();
        ACTTeacher a2=new ACTTeacher("魏和尚",20,18000,"男");
        c2.eat();
        a2.drink();
        System.out.println(a2.getName()+""+a2.getAge()+""+a2.getSalary()+""+a2.getGender());

    }
}
abstract class Teacher{
    private String name;
    private int age;
    private double salary;
    private String gender;
    public Teacher() {
        System.out.println("老师无参");
    }

    public Teacher(String name, int age, double salary, String gender) {
        System.out.println("老师全参");
        this.name = name;
        this.age = age;
        this.salary = salary;
        this.gender = gender;
    }

    public abstract void ready();
    public abstract void teach();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
}
class CGBTeacher extends Teacher{
    public CGBTeacher(String name, int age, double salary, String gender) {
        super(name, age, salary, gender);
        System.out.println("CGB全参构造");
    }

    public CGBTeacher() {
        System.out.println("CGB无参构造");
    }

    public void ready() {
        System.out.println("正在备课电商项目");
    }
    public void teach() {
        System.out.println("正在讲课电商项目");
    }
    public void eat(){
        System.out.println(this.getName()+"爱吃包子");
    }
}
class ACTTeacher extends Teacher{
    public ACTTeacher() {
        System.out.println("ACT无参构造");
    }

    public ACTTeacher(String name, int age, double salary, String gender) {
        super(name, age, salary, gender);
        System.out.println("ACT全参构造");
    }

    public void ready() {
        System.out.println("正在备课框架加强");
    }
    public void teach() {
        System.out.println("正在将课框架加强");
    }
    public void drink(){
        System.out.println(this.getName()+"爱喝豆浆");
    }
}